Cavern

 Cavern4D

 Cavernize

 Debug

 FilterInterfaces

 Filters

 Format

  Common

  Consts

  Container

  Decoders

  Environment

  FilterSet

  Renderers

  Transcoders

  Utilities

  BlockBuffer

  BlockBuffer(Func)

  BlockBuffer(Func, Action)

  Clear()

  Create(Stream, int)

  FreshFetch

  LastFetch

  LastFetchStart

  Read(int)

  Readable

  ReadOne()

  Seek(long)

  BufferedInputStream

  IDisposable

  IXDocumentSerializable

  AudioFormat

  AudioReader

  AudioTrackReader

  AudioWriter

  BitDepth

  EnhancedAC3Reader

  LAFMode

  LimitlessAudioFormatReader

  LimitlessAudioFormatWriter

  RIFFWaveReader

  RIFFWaveWriter

  SegmentedAudioReader

  SegmentedAudioWriter

 Helpers

 QuickEQ

 Remapping

 SpecialSources

 Spoofer

 Utilities

 Virtualizer

 Atmosphere

 AudioClip3D

 AudioListener3D

 AudioListener3DInspector

 AudioSource3D

 CavernizeRealtime

 Channel

 Clip

 Environments

 Jack

 Listener

 QualityModes

 Rolloffs

 SeatAdaptation

 Source

class BlockBuffer<T>

Converts a function that fetches a given chunk of a stream to an object that can fetch a block with any size.
VisibilityPublic
Modifierssealed

Public functions

Constructor BlockBuffer(Func<T[]> fetcher)Converts a function that fetches a given chunk of a stream to an object that can fetch a block with any size.
Constructor BlockBuffer(Func<T[]> fetcher, Action<long> seeker)Converts a function that fetches a given chunk of a stream to an object that can fetch a block with any size.
void Clear()Flush the current cache and read a new block. This should be called when a stream position changes.
T[] Read(int elements)Read the next fixed number of elements from the stream.
T ReadOne()Read the next value from the stream.
void Seek(long position)Jumps to a position in the source stream if it's supported.

Public static functions

BlockBuffer<byte> Create(Stream reader, int blockSize = 4096)Converts a stream reader to a block buffer of fixed size.

Public properties

bool FreshFetch Indicates that the LastFetch was not yet read from.
T[] LastFetchResult of the last Fetcher call.
int LastFetchStartThe position of the first sample of the last exported block in the buffer.
bool Readable True if there's more data to read.